﻿#pragma once
//【头文件包含】
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<math.h>
#include<string.h> 

//【函数声明】
/*元素交换*/void Swap(int* p1, int* p2);
/*打印数组*/void PrintArr(int* a, int n);

/*插入排序*/void InsertSort(int* a, int n);

/*希尔排序*/void ShellSort(int* a, int n);

/*选择排序*/void SelectSort(int* a, int n);

/*堆排序-向下调整*/void AdjustDown(int* a, int n,int root);
/*堆排序*/void HeapSort(int* a, int n);

/*冒泡排序*/void BubbleSort(int* a, int n);

/*快速排序-三树数取中*/int GetMidIndex(int* a, int begin, int end);
/*快速排序-单趟快排1（左右指针法）*/int PartSort1(int* a, int begin, int end);
/*快速排序-单趟快排2（挖坑法）*/int PartSort2(int* a, int begin, int end);
/*快速排序-单趟快排3（前后指针法）*/int PartSort3(int* a, int begin, int end);
/*快速排序-递归*/void QuickSort(int* a, int l, int r);
/*快速排序-非递归*/void QuickSortNonR(int* a,int l, int r);

/*归并排序*/void MergeSort(int* a, int n);
